list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
list1 = []
i = 0
while i < len(list):
    x = list[i]
    if x % 2 == 0:
        list1.append(x)
    i += 1
print(list1)

